<template>
  <div class="box">
    <div v-if="data.title" class="back-to-ceiling">
      <div class="title">
        <p>{{ data.title }}</p>
        <a-icon type="close" @click="close" />
      </div>
      <div class="context">
        {{ data.sysNoticeResult.noticeContent }}
      </div>
      <div style="width: 100%; margin-top: 10px">
        <fileUpload ref="fileUpload" :disabled="true" />
      </div>
    </div>
  </div>
</template>
<script>
import { toDoListTotleNew } from '@/api/dashboard/workplace'
import fileUpload from '@/components/upload/fileUpload.vue'
import { mapGetters } from 'vuex'
export default {
  components: {
    fileUpload,
  },
  data() {
    return {
      data: {},
    }
  },
  // computed: {
  //   ...mapGetters(['token']),
  // },
  watch: {
    // token: {
    //   handler: function (val, oldVal) {
    //     if (this.token) {
    //       toDoListTotleNew({}).then((res) => {
    //         this.data = res
    //         this.$nextTick(() => {
    //           this.$refs.fileUpload && this.$refs.fileUpload.inits(res.sysNoticeResult.fileEntityList)
    //         })
    //       })
    //     } else {
    //       this.data.title = ''
    //     }
    //   },
    // },
  },
  mounted() {},
  methods: {
    close() {
      this.data.title = ''
    },
  },
}
</script>
<style lang="less" scoped>
.back-to-ceiling {
  z-index: 111;
  position: fixed;
  right: 5px;
  bottom: 10px;
  width: 250px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  padding: 20px;
  .title {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    p {
      color: #000;
      margin: 0;
      letter-spacing: 2px;
    }
  }
  .context {
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    text-indent: 2em;
    color: #8d8282;
  }
}
</style>